In recent years, the use of smaller, inexpensive laser printers with personal computers has created an entirely new industry referred to as desktop publishing. Desktop publishing systems offer users the ability to format and print documents having complicated layouts using characters that have a variety of different fonts and type sizes. While desktop publishing systems represent a significant advance in the art of publishing, the standard resolution of the laser printers used with such systems (typically a 300.times.300 dots per inch (dpi) Canon CX or SX-based laser printer, e.g. a Hewlett Packard LaserJet Series II printer) was too poor to compete with traditional phototypesetting systems.
In an effort to improve the quality and speed of the smaller, inexpensive laser printers used with desktop publishing systems, a variety of printer controller cards have been introduced that may be installed either in the laser printer or in the personal computer. Certain of the printer controller cards that are installed directly in the personal computer increase the quality and speed of the laser printers by using a separate co-processor and page frame buffer to create a pixel representation of the image to be printed on the laser printer. This image is then printed from the pixel representation in the page frame buffer by directly controlling the modulation of the laser in the print-engine of the laser printer. An example of such a printer control card is the LX6 Professional printer controller cards available from LaserMaster Corporation, Eden Prairie, Minn., the assignee of the present invention.
In some of the prior art printer controller cards, such as the LX6 Professional, it is possible to increase the horizontal resolution of the laser printer by controlling the modulation of the laser in the print-engine of the laser printer. By doing so, the LX6 Professional printer controller cards can increase the horizontal component of the pixel resolution of the laser printer to 600.times.300 dpi or 1000.times.400 dpi, depending upon the type of laser printer. This increase in horizontal resolution significantly improves the quality of the resulting printed image, particularly for pixel transition points along the outline edges of a character or image that occur in the vertical or near vertical orientation. Unfortunately, the increased horizontal resolution does little to improve the quality of the outline edges of a character or image that are near horizontal in slope.
The noticeability and appearance of such vertical pixel transition points is typically referred to as aliasing that results in jagged or stairstep edges of the character or image outline oriented generally in the horizontal direction. Traditionally, anti-aliasing techniques incorporating a gray-scale approach have been used in video displays to resolve this type of problem. Unfortunately, laser printers are binary imaging devices and are not capable of implementing such gray-scale techniques. In larger and more expensive laser printers, the problems associated with aliasing and non-smooth edges may be resolved by using higher pixel resolutions in these printers. In the smaller, inexpensive laser printers used, for example, with desktop publishing systems, this approach is not used because of the associated increase in cost.
In accordance with the parent application of the present invention, a non-gray scale anti-aliasing method for smoothing the horizontal components of the edges of an image to be printed by a laser printer having unequal pixel resolutions in the horizontal and vertical dimensions is described. The method was specifically described for use by a processor that is provided with an ideal outline of the image and then rasterizes the ideal outline of the image using the processor for determining which pixels to turn on and which pixels to turn off in a frame buffer that stores a pixel representation of the image to be printed by the laser printer. The smoothing is accomplished by selectively modifying the on and off states of pixels on either side of each vertical transition point along the horizontal components of raster lines representing the edges of the pixel representation of the image.
It will be recognized that the pixel representation created in the frame buffer for each horizontal raster line is used to control the laser in the laser printer. When the laser is turned on in response to an "on" pixel, a generally circular laser beam image is reflected on the print drum of the print engine to transfer charge elements to the drum. The charge elements attract and pick up toner that is then transferred to a sheet of paper. Although the pixel elements are thought of as square or rectangular shapes, in actuality, the edges of the pixels typically bleed into one another.
In essence, the parent application for the present invention taught that the vertical transition points in the horizontal raster lines could be smoothed by selectively adding and subtracting pixels around the transition points. In the preferred embodiment of the parent application, the smoothing of the horizontal components of the edges of the ideal outline is accomplished during the rasterization fill process for each horizontal raster line. As each line is rasterized, the processor accumulates a running fill value that represents the area of each pixel inside the ideal outline that should be turned "on" or filled. If the processor determines that the area of the fill value is greater than the area of a pixel, the pixel presently being processed is turned "on" and the area of a pixel is substracted from the fill value. In this embodiment, the fill value acts like a running accumulator with the carry out of the accumulator being used to determine whether the pixel presently being processed should be turned "on".
The second parent application of the present taught that this non-gray scale anti-aliasing method could be generalized and adapted to a wide variety of laser printers having different sizes, shapes and power densities associated with their laser beam spot images. Using the generalized approach, the smoothing of the edges of the ideal outline is accomplished by comparing the ideal fill area to at least a first and second comparison value. Based upon the comparison of the ideal fill area and the first and second comparison values, a determination is made as to whether the pixel currently being processed will be turned on or turned off.
Although these non-gray scale anti-aliasing techniques provide an effective mechanism for smoothing the edges of outline images, it has been discovered that these techniques are not as effective in smoothing line images, particularly obliquely angled lines and curves, and especially lines and curves that have shallow aspect angles from the horizontal. One of the reasons that these types of line images present a problem is because the ideal line image does not have any width. This lack of width results in the absence of an outlined fill area to use in determining which pixels to turn on and which pixels to turn off.
Higher resolution printer and display systems resolve this situation by using the Bresenham technique, for example, to trace a brush stroke along the path of the ideal line image. The brush stroke is typically a geometric shape having a diameter (in terms of numbers of pixels) equal to that of the desired width of the line. U.S. Pat. Nos. 4,819,185 and 4,849,910 demonstrate the application of variations of this technique in higher resolution laser printers. Unfortunately, the Bresenham technique is useful only in those situtations where the dimensions of the pixels in the printer are smaller than the smallest desired line width.
If the smallest line width is approximately equal to or less than the pixel dimensions of a given binary imaging device, then an ideal line image of that width or less must be represented by a sequence of single pixels turned on along the path of the ideal line image. A line of this width will be drawn by determining the initial coordinates of the line in the pixel frame buffer and then turning on one pixel at a time in the direction of the ideal line image. This has been the prior art technique utilized by most of the laser printers associated with desktop publishing systems, for example. Unfortunately, when the slope of the ideal line image crosses from one horizontal raster line to the next adjacent raster line, an abrupt vertical transition point occurs between the two raster lines. This abrupt transition point creates the familiar problem of printing jagged or stair-stepped images, rather than the smooth and uniformly thick line images that are desired.
While non-gray scale anti-aliasing techniques of the parent applications have taught a method for smoothing the edges of jagged images, these techniques are not generally applicable to line images because of the lack of an ideal outline image. Accordingly, it would be desirable to provide for a line rasterization technique that would allow the non-gray scale anti-aliasing technique of the parent applications to be extended to smooth lines images to be printed on a laser printer, especially where the line width is approximately equal to or less than the pixel dimensions of the laser printer.